package com.design.mode.abstractfactory;

/**
 * @Date 2023/3/29 14:57:59
 * @Author luopeng
 */
public class AbstractFactoryPatternDemo {
    public static void main(String[] args) {
        AbstractFactory colorFactory = FactoryProducer.getFactory("colorFactory");
        colorFactory.getColor("blue").fill();
        colorFactory.getColor("green").fill();
        colorFactory.getColor("red").fill();

        AbstractFactory shapeFactory = FactoryProducer.getFactory("shapeFactory");
        shapeFactory.getShape("Circle").draw();
        shapeFactory.getShape("Rectangle").draw();
        shapeFactory.getShape("Square").draw();
    }
}
